package com.nmsl.medicine.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nmsl.medicine.mapper.StorageInDetailRecordMapper;
import com.nmsl.medicine.domain.StorageInDetailRecord;
import com.nmsl.medicine.service.IStorageInDetailRecordService;

/**
 * 入库详情记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-19
 */
@Service
public class StorageInDetailRecordServiceImpl implements IStorageInDetailRecordService 
{
    @Autowired
    private StorageInDetailRecordMapper storageInDetailRecordMapper;

    /**
     * 查询入库详情记录列表
     * 
     * @param storageInDetailRecord 入库详情记录
     * @return 入库详情记录
     */
    @Override
    public List<StorageInDetailRecord> selectStorageInDetailRecordList(StorageInDetailRecord storageInDetailRecord)
    {
        List<StorageInDetailRecord> list=storageInDetailRecordMapper.selectStorageInDetailRecordList(storageInDetailRecord);
        for (int i = 0; i < list.size(); i++) {
            list.get(i).getAll();
            System.out.println(list.get(i));
        }
        System.out.println(list);
        return list;
    }

    /**
     * 新增入库详情记录
     * 
     * @param storageInDetailRecord 入库详情记录
     * @return 结果
     */
    @Override
    public int insertStorageInDetailRecord(StorageInDetailRecord storageInDetailRecord)
    {
        return storageInDetailRecordMapper.insertStorageInDetailRecord(storageInDetailRecord);
    }

    /**
     * 修改入库详情记录
     * 
     * @param storageInDetailRecord 入库详情记录
     * @return 结果
     */
    @Override
    public int updateStorageInDetailRecord(StorageInDetailRecord storageInDetailRecord)
    {
        return storageInDetailRecordMapper.updateStorageInDetailRecord(storageInDetailRecord);
    }

    /**
     * 批量删除入库详情记录
     * 
     * @param storageInDetailIds 需要删除的入库详情记录主键
     * @return 结果
     */
    @Override
    public int deleteStorageInDetailRecordByStorageInDetailIds(Long[] storageInDetailIds)
    {
        return storageInDetailRecordMapper.deleteStorageInDetailRecordByStorageInDetailIds(storageInDetailIds);
    }

    /**
     * 删除入库详情记录信息
     * 
     * @param storageInDetailId 入库详情记录主键
     * @return 结果
     */
    @Override
    public int deleteStorageInDetailRecordByStorageInDetailId(Long storageInDetailId)
    {
        return storageInDetailRecordMapper.deleteStorageInDetailRecordByStorageInDetailId(storageInDetailId);
    }
}
